package com.huawei.appmarket.service.appprofile;

import android.content.Context;
import android.content.Intent;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import com.huawei.secure.android.common.intent.SafeBroadcastReceiver;
import o.cdk;

public class AppProfileResultReceiver extends SafeBroadcastReceiver {
    public void onReceiveMsg(Context context, Intent intent) {
        String action = intent.getAction();
        if ("AppProfile.DownloadResult".equals(action)) {
            int intExtra = intent.getIntExtra("AppProfile.DownloadResult.Param.Result", 0);
            String stringExtra = intent.getStringExtra("AppProfile.DownloadResult.Param.PackageName");
            int intExtra2 = intent.getIntExtra("AppProfile.DownloadResult.Param.VersionCode", 0);
            if (intExtra == 1) {
                cdk.ॱ(context, "990601", stringExtra + HiAnalyticsConstant.REPORT_VAL_SEPARATOR + intExtra2);
                return;
            }
            cdk.ॱ(context, "990602", stringExtra + HiAnalyticsConstant.REPORT_VAL_SEPARATOR + intExtra2 + HiAnalyticsConstant.REPORT_VAL_SEPARATOR + intent.getStringExtra("AppProfile.DownloadResult.Param.Reason"));
        } else if ("AppProfile.CommitResult".equals(action)) {
            action = intent.getStringExtra("AppProfile.DownloadResult.Param.PackageName");
            cdk.ॱ(context, "990603", action + HiAnalyticsConstant.REPORT_VAL_SEPARATOR + intent.getIntExtra("AppProfile.DownloadResult.Param.VersionCode", 0));
        } else if ("AppProfile.InstallFailed".equals(action)) {
            action = intent.getStringExtra("AppProfile.DownloadResult.Param.PackageName");
            cdk.ॱ(context, "990102", action + HiAnalyticsConstant.REPORT_VAL_SEPARATOR + intent.getIntExtra("AppProfile.DownloadResult.Param.VersionCode", 0));
        }
    }
}
